{template '_header'}

<div class="page-header">
    当前位置：<span class="text-primary">{if !empty($item['id'])}编辑{else}添加{/if}投资人</span>
</div>

<div class="page-content">
    <div class="page-sub-toolbar">
        <span class=''>
		{ifp 'manage.owner.add'}
                <a class="btn btn-primary btn-sm" href="{php echo webUrl('manage/owner/post')}">添加新投资人</a>
            {/if}
            <a class="btn btn-default  btn-sm" href="{php echo webUrl('manage/owner')}">返回列表</a>
        </span>
    </div>

<form id="setform"  {ifp 'manage.owner.edit'}action="" method="post"{/if} class="form-horizontal form-validate">

<input type="hidden" name="id" value="{$item['id']}" />

<div class="tabs-container">
    <div class="tab-content ">
        <div class="tab-pane active" id="tab_basic">

            <div class="form-group">
                <label class="col-sm-2 control-label must">投资人姓名</label>
                <div class="col-sm-8">
                    {ifp 'manage.owner.edit'}
                    <input type="text" class="form-control" name="nickname" value="{$item['nickname']}" data-rule-required="true"/>
                    {else}
                    <div class="form-control-static">
                        {$item['nickname']}
                    </div>
                    {/if}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label must">账号</label>
                <div class="col-sm-8">
                    {ifp 'manage.owner.edit'}
                    <input type="text" class="form-control" name="account" value="{$item['account']}" data-rule-required="true"/>
                    {else}
                    <div class="form-control-static">
                        {$item['account']}
                    </div>
                    {/if}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">密码</label>
                <div class="col-sm-8">
                    {ifp 'manage.owner.edit'}
                    <input type="password" class="form-control" name="password" value="" />
                    {if !empty($item['id'])}<span class="help-block text-danger">不修改密码请留空</span>{/if}
                    {else}
                    <div class="form-control-static">               </div>
                    {/if}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">图片</label>
                <div class="col-sm-8">
                    {ifp 'manage.owner.edit'}
                    {php echo tpl_form_field_image('thumb',$item['thumb'],'../addons/mx_shop/static/images/nopic.jpg')}
                    {else}
                    {if empty($item['thumb'])}
                    <img src="../addons/mx_shop/static/images/nopic.jpg" onerror="this.src='../addons/mx_shop/static/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
                    {else}
                    <img src="{php echo tomedia($item['thumb'])}" onerror="this.src='../addons/mx_shop/static/images/nopic.jpg'; this.title='图片未找到.'" class="img-responsive img-thumbnail" width="150">
                    {/if}
                    {/if}
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">状态</label>
                <div class="col-sm-8">
                    {ifp 'manage.owner.edit'}
                    <label class="radio-inline">
                        <input type="radio" name="status" value="1" {if $item['status']==1}checked{/if} />启用
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="status" value="0" {if $item['status']==0}checked{/if}/> 禁用
                    </label>
                    {else}
                    <div class="form-control-static">
                        {if $item['status']==0}
                        禁用
                        {elseif $item['stauts']==1}
                        启用
                        {/if}
                    </div>
                    {/if}
                </div>
            </div>
        </div>
    </div>
</div>

{ifp 'manage.owner.edit'}
<div class="form-group">
    <label class="col-sm-2 control-label"></label>
    <div class="col-sm-9 col-xs-12">
        <input type="submit"  value="提交" class="btn btn-primary" />
    </div>
</div>
{/if}

</form>
</div>
{template '_footer'}